<%
  #File:    /app/views/manage/documents/manage_files.rhtml
  #Author:  Andrew Stone
  #Created: 08.25.2006
%>
<%=error_messages_for("document")%>
<%=error_messages_for("document_version")%>

<%=start_form_tag({:action => "manage_files", :id => @category.id},{:multipart => true})%>
<%=start_large_div_wrapper%>
  <h3>Managing <%=@category.name%> files</h3>
  <div id="large">
    <table>
      <tr>
        <td>&nbsp;</td>
        <td class="data">
          <%=check_box_tag("add_to_home_page",1,true)%> Add notice of update to home page.
        </td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td class="data">
          <%=check_box("document","is_featured")%> Add link in "Featured Documents" (on home page) to this document.
        </td>
      </tr>
      <tr>
        <td class="req_label">Title:</td>
        <td class="data"><%=text_field("document","title")%></td>
      </tr>
      <tr>
        <td class="req_label">File:</td>
        <td class="data"><%=file_field("document_version","name")%></td>
      </tr>
    </table>
    <div id="actions">
      <%=submit_tag("Cancel")%>
      <%=submit_tag("Add file")%>
    </div>
    <div class="container">
      <h3>File Listing</h3>
      <%=render(:partial => "list_files")%>
    </div>
  </div>
<%=end_div_wrapper%>
<%=end_form_tag%>

